package com.liqi.common.utils;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;

public class ReportUtil {

    private final static DateTimeFormatter FORMATTER_YYYYMMDD = DateTimeFormatter.ofPattern("yyyy-MM-dd");

    public static List<String> near30Day() {
        LocalDate now = LocalDate.now();
        List<String> list = new ArrayList<>(30);
        for (int i = 29; i >= 0; i--) {
            list.add(FORMATTER_YYYYMMDD.format(now.plusDays(-i)));
        }
        return list;
    }

}
